set number relativenumber
set noexpandtab
set nosmartindent
set autoindent 
set nocindent
set nobackup
set noswapfile
set shiftwidth=4
set softtabstop=4
set clipboard=unnamedplus
set hlsearch
set incsearch
nnoremap <silent> <Esc><Esc> :noh<CR>

" 深灰色 + 白字
hi Search     ctermbg=239 ctermfg=White guibg=#4e4e4e guifg=#ffffff 
" 深蓝色 + 白字
hi CurSearch  ctermbg=24  ctermfg=White guibg=#aaaaaa guifg=#ffffff
" 深橄榄绿 + 白字
hi IncSearch  ctermbg=58  ctermfg=White guibg=#bbbbbb guifg=#ffffff

filetype plugin indent on
" 临时关闭行号
nnoremap <F2> :set number! relativenumber!<CR>
" 切换行号和相对行号
nnoremap <F3> :set number relativenumber!<CR>

highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
autocmd BufRead,BufNewFile *.yml set filetype=yaml
"autocmd FileType yaml setlocal sw=2 ts=2 et a

"set rtp+=/usr/local/lib/python3.10/dist-packages/powerline/bindings/vim/

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'powerline/powerline', {'rtp': 'powerline/bindings/vim'}
call vundle#end()

set ambiwidth=single
"set ambiwidth=double
set laststatus=2
set t_Co=256
let g:airline_theme="base16_nord"
let g:airline_powerline_fonts=2
"let g:Powerline_symbols='fancy'

if !exists('g:airline_symbols')
  let g:airline_symbols = {}
endif
" unicode symbols
let g:airline_left_sep = '> '
let g:airline_left_sep = '> '
let g:airline_right_sep = '< '
let g:airline_right_sep = '< '
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.maxlinenr = '☰'
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'

